package com.zerui.manager.web.cmd;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDate;
import java.time.LocalTime;

/**
 * @author liushaohua
 * @title: OpenPlanAddCmd
 * @description:
 * @date 2023/9/1 17:46
 */
@Getter
@Setter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OpenPlanAddCmd {
	@ApiModelProperty("名称")
	@NotBlank(message = "计划名称不能为空")
	@Size(min = 1,max = 30)
	private String name;

	@ApiModelProperty("有效日期 - 开始")
	@JsonFormat(pattern = "yyyy/MM/dd")
	@NotNull(message = "有效日期不能为空")
	private LocalDate startDate;

	@ApiModelProperty("有效日期 - 结束")
	@JsonFormat(pattern = "yyyy/MM/dd")
	@NotNull(message = "有效日期不能为空")
	private LocalDate endDate;

	@ApiModelProperty("有效时间 - 开始")
	@JsonFormat(pattern = "HH:mm")
	@NotNull(message = "有效时间不能为空")
	private LocalTime startTime;

	@ApiModelProperty("有效时间 - 结束")
	@JsonFormat(pattern = "HH:mm")
	@NotNull(message = "有效时间不能为空")
	private LocalTime endTime;

	@ApiModelProperty("是否包含周末，1：是，0：否")
	@NotNull(message = "是否包含周末不能为空")
	private Boolean weekend;

	@ApiModelProperty("备注")
	private String remark;

}
